<template>
    <z-paging ref="paging" v-model="shopList" @query="queryList">
        <u-sticky>
            <hedsty :mrbot="'32'" :headCentext="'幸运抽奖'"></hedsty>
        </u-sticky>
        <view class="dange_box" v-for="(item, index) in shopList" :key="index">
            <view class="top_xiaowenzi_box">{{ item.content }}</view>
            <view class="zhongjian_hezi_box">
                <view class="left_box">
                    <image :src="item.image" mode="widthFix" />
                </view>
                <view class="right_box">
                    <view class="to_box">{{ item.name }}</view>
                    <view class="jiagebox">¥{{ item.price }}</view>
                </view>
            </view>

            <view class="anniu_box" @click="ljJon(item)">立即参与</view>
        </view>

        <view class="zengsongbtn" @click="$router('/userPage/luckydraw/canyujilu')"
            style="background-image: url('https://morgan.dingxians.cn/static/bonusgive/2.png');">参与记录
        </view>
    </z-paging>
</template>
<script>
import hedsty from '../../components/hedsty.vue'
export default {
    components: {
        hedsty
    },
    data() {
        return {
            shopList: []
        }
    },
    onLoad() {

    },
    onShow() {
        uni.hideLoading()
    },
    methods: {
        ljJon(item) {
            this.$router('/userPage/luckydraw/luckydraw?id=' + item.id)
        },
        queryList(pageNo, pageSize) {
            let data = {
                page: pageNo,
                limit: pageSize
            }
            this.$Request.get(this.$api.user.luckDraws, data).then(res => {
                if (res.code == 200) {
                    this.$refs.paging.complete(res.data.data)
                }
            })

        },
    }
}
</script>
<style lang="scss" scoped>
.dange_box {
    width: 720rpx;
    height: 274rpx;
    background-image: url('https://morgan.dingxians.cn/upload/20241029/6720a9169e104.png');
    background-size: 100% 100%;
    margin: auto;
    margin-bottom: 10rpx;
    box-sizing: border-box;
    padding-top: 4rpx;
    position: relative;

    .top_xiaowenzi_box {
        width: 100%;
        height: 24rpx;
        font-family: Source Han Sans, Source Han Sans;
        font-weight: 500;
        font-size: 17rpx;
        color: #FFFFFF;
        line-height: 24rpx;
        text-align: center;
        font-style: normal;
        text-transform: none;
        margin-bottom: 26rpx;
    }

    .zhongjian_hezi_box {
        width: 100%;
        height: 158rpx;
        box-sizing: border-box;
        padding: 0 46rpx;
        display: flex;
        justify-content: flex-start;

        .left_box {
            width: 156rpx;
            height: 158rpx;
            background-image: url('https://morgan.dingxians.cn/static/fuyuri/16.png');
            background-size: 100% 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-right: 30rpx;

            image {
                width: 120rpx;
            }
        }

        .right_box {
            width: 400rpx;
            height: 158rpx;
            box-sizing: border-box;
            padding-top: 18rpx;

            .to_box {
                width: 100%;
                height: 44rpx;
                font-family: Source Han Sans, Source Han Sans;
                font-weight: 500;
                font-size: 30rpx;
                color: #FFFFFF;
                line-height: 44rpx;
                text-align: left;
                font-style: normal;
                text-transform: none;
                margin-bottom: 14rpx;
            }

            .jiagebox {
                width: 100%;
                height: 50rpx;
                font-family: Source Han Sans, Source Han Sans;
                font-weight: 500;
                font-size: 34rpx;
                color: #FFFFFF;
                line-height: 50rpx;
                text-align: left;
                font-style: normal;
                text-transform: none;
            }
        }
    }

    .anniu_box {
        position: absolute;
        width: 158rpx;
        height: 56rpx;
        text-align: center;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
        font-family: Source Han Sans, Source Han Sans;
        background-image: url('https://morgan.dingxians.cn/upload/20241028/671f328ab8cb9.png');
        background-size: 100% 100%;
        font-weight: 500;
        font-size: 24rpx;
        color: #FFFFFF;
        line-height: 40rpx;
        text-align: center;
        font-style: normal;
        text-transform: none;
        right: 40rpx;
        bottom: 70rpx;
    }
}

.zengsongbtn {
    width: 529rpx;
    height: 120rpx;
    background-size: 100% 100%;
    position: fixed;
    left: 0;
    right: 0;
    margin: auto;
    bottom: 100rpx;
    font-family: text1;
    font-weight: bold;
    font-size: 36rpx;
    color: #FFFFFF;
    line-height: 120rpx;
    text-align: center;
    z-index: 99999;
}
</style>
